
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<script type="text/javascript" language="javascript">
    var open_cur = 0;
    $j = jQuery.noConflict();
    $j(document).ready(function(){
        var a = ${CustomerBean.show1}       ;
        var b = ${CustomerBean.show2}       ;
        /*
        if(a){
            $j(".selectcmb2").show();
            $j(".selectcmb3").hide();
        }
        if(b){
            $j(".selectcmb3").show();
            $j(".selectcmb2").hide();
        }*/

    });
</script>
<style>
    .content_cmb{
        float: left;
        margin-left: 20px;
        margin-top: 25px;
        width:94%;
    }
    .content_cmb .selectcmb1{
        width:100%;
        float:left;
        margin-bottom: 8px;
    }
    .content_cmb .selectcmb1 label{
        float: left;
        padding:4px;
        width:90px;
        text-align: right;
    }
    .content_cmb .selectcmb1 select{
        float: left;
        height: 24px;
        width: 150px;
    }
    .content_cmb .selectcmb2{
        width:100%;
        float:left;
        margin-bottom: 8px;
    }
    .content_cmb .selectcmb2 label{
        float: left;
        padding:4px;
        width:90px;
        text-align: right;
    }
    .content_cmb .selectcmb2 select{
        float: left;
        height: 24px;
        width: 150px;
    }
    .content_cmb .selectcmb3{
        width:100%;
        float:left;
        margin-bottom: 8px;
    }
    .content_cmb .selectcmb3 label{
        float: left;
        padding:4px;
        width:90px;
        text-align: right;
    }
    .content_cmb .selectcmb3 select{
        float: left;
        height: 24px;
        width: 150px;
    }


</style>
<f:view>
    <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
    <a4j:form id="form1">
        <div class="popup" style="height:200px; width:350px">
            <div class="popup-header">
                <div class="title"><h:outputText value="#{locale.representative}"/></div>
            </div>
            <div class="popup-content">
                <div class="main_content">
                    <div class="content_cmb">
                        <div class="selectcmb1">
                            <label><h:outputText value="#{locale.department}"/>:</label>&nbsp;
                            <h:selectOneMenu   id="cmbNv113" value="#{CustomerBean.fn850}"  valueChangeListener="#{CustomerBean.changeCombN850forN900}">  
                                <f:selectItems value="#{CustomerBean.selectCombN850}" />  
                                <a4j:support event="onchange" reRender="nv113,nv112" />
                            </h:selectOneMenu>
                        </div>
                        <%--
                        <div class="selectcmb3" >
                            <label>Nhân viên:</label>&nbsp;
                            <h:selectOneMenu id="nv112" value="#{CustomerBean.nv112}">
                                <f:selectItems value="#{CustomerBean.selectItemN900}"></f:selectItems>
                            </h:selectOneMenu>
                        </div>
                        --%>
                        <div class="selectcmb2" >
                            <label><h:outputText value="#{locale.employee}"/>:</label>&nbsp;
                            <h:selectOneMenu id="nv113" value="#{CustomerBean.nv113}">
                                <f:selectItems value="#{CustomerBean.selectItemN900}"></f:selectItems>
                            </h:selectOneMenu>
                        </div>
                        

                    </div>                 
                </div>
            </div>
            <div class="popup-footer">              
                <div class="buttonsave" onclick="jQuery.fancybox.close() "><span><h:outputText value="#{locale.close}"/></span></div>
                <a4j:commandButton  actionListener="#{CustomerBean.saveColumnN100}" value="#{locale.save}" styleClass="buttonsave"  reRender=":form1">                      
                </a4j:commandButton>
                <h:inputHidden value="#{CustomerBean.pn100}" id="pn100" />
                <h:inputHidden value="#{CustomerBean.flag}" id="flag" />
                <h:inputHidden value="#{CustomerBean.sendPage}" id="sendPage" />

            </div>
        </div>

    </a4j:form>
</f:view>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>